<template>
	<view class="w-full bg-f6f6f6 h-screen pt-10vh overflow-hidden">
		<!-- 名片卡片 -->
		<view class="card-shadow w-690 p-32 m-auto flex mt-20 mb-20 radius-24 bg-white" v-if="userInfo.id">

			<view class="ml-32 flex-1">
				<view class="f-44 text-333 text-bold">{{ userInfo.nickName }}</view>
				<view class="flex align-items-center mt-12">
					<wd-icon name="note" size="16px"></wd-icon>
					<text class="ml-12 f-32 text-666">{{ userInfo.phone }}</text>
				</view>
				<view class="flex align-items-center mt-12">
					<wd-icon name="note" size="16px"></wd-icon>
					<text class="ml-12 f-32 text-666">{{ userInfo.companyName }}</text>
				</view>
				<view class="flex align-items-center mt-12">
					<wd-icon name="note" size="16px"></wd-icon>
					<text class="ml-12 f-32 text-666">{{ userInfo.selfNote }}</text>
				</view>
			</view>

			<view class="flex flex-col align-items-center">
				<!-- 头像 -->
				<wd-img :width="80" radius="8" :height="80" :src="userInfo?.avatar ? userInfo?.avatar : `${$oss}/static/ai/01.png`"
					enable-preview />
			</view>
		</view>

		<view class="w-690 p-30 m-auto flex align-items-center radius-12 overflow-hidden mt-80 bg-white"
			v-if="userInfo.id && userInfo.wxQrcodeState === 1 && userInfo.wxQrcode">
			<wd-img :width="375" :height="375" radius="8" :src="userInfo.wxQrcode" enable-preview />
		</view>

	</view>
</template>

<script setup>
	import { useUserStore } from '@/store/user.js'
	import { ref } from 'vue'
	const { uploadFile, api_get_myInfo, api_post_updateMyInfo } = useRequest()
	const userStore = useUserStore()
	const { userInfo } = storeToRefs(userStore)
</script>


<style scoped lang="scss">
	.card-shadow {
		box-shadow: 0 8px 32px 0 rgba(52, 120, 246, 0.08), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
		border-radius: 24px;
		border: 1px solid #f5e9e7;
	}
</style>